#ifndef _TANKBODY_H
#define _TANKBODY_H


#include "BaseComponent.h"
#include "TankChasis.h"
#include "TankTurret.h"
#include <vector>
#include <boost/shared_ptr.hpp>

class TankBody : public BaseComponent {
  public:
    TankBody(const char * modelName);

    virtual ~TankBody();

    bool AttachChasis(_TankChasis & chasis);

    bool AttachTurret(const _TankTurret & turret, char slot);

    virtual void Assemble();

    //Draws object in given position
    
    virtual void DrawAt(const BaseComponent::point & position);

    //Rotates given turret into given angle.
    void SetTurretAngle(char slot, float angle);


  protected:
    unsigned char _maxTurrets;

    _TankChasis _chasis;

    std::vector<_TankTurret> _turrets;


  private:
    std::vector<BaseComponent::point> _turretSlots;

};
typedef boost::shared_ptr<TankBody> _TankBody;
#endif
